home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Reference Guide
/
C-C++ Interactive Reference Guide.iso
/
c_ref
/
csource3
/
144_01
/
search.hlp
< prev
next >
Wrap
Text File
|
1985-08-21
|
3KB
|
58 lines
**********************************************************************
* SEARCH *
**********************************************************************
* COPYRIGHT 1983 EUGENE H. MALLORY *
**********************************************************************
PROGRAM:
SEARCH - Search files for lines containing a pattern.
USAGE:
SEARCH [<fid] pattern afn [-X] [-L] [-N] [-H] [>fid]
FUNCTION:
This searches files for lines containing the supplied pattern and
outputs the selected lines. The default is to output file names
of files which contain the pattern. Other selection options are:
-X Suppress listing of the file names
-L List lines containing the pattern.
-N Output found lines with their line number.
-H Display the available options and metacharacters.
All files defined by the afn are searched. If input is also
from a file (<fname), file names are taken from the input file.
The pattern is very general. There are the following options.
* Any number of any characters, from 0 to 132.
? Any single character.
_ A space character.
\ Literal character. Used to include *, ? etc. in pattern.
{ Beginning of line.
} End of line.
@ Any alphabetic character.
# Any number.
! NOT This may be used with any printable character, _,
{, }, @, and #, as well as \char forms. This can be used
to find strings NOT at the beginnnin# or end of a line.
EXAMPLE:
SEARCH FILE *.C |SEARCH FCLOSE {Finds all C programs with the
words FILE and FCLOSE}
SEARCH JOHN_SMITH *.TXT {Finds all text files with John Smith}
SEARCH NASA *.TXT -ln {Finds and displays all text lines
contini## the word NASA}
SEARCH LABEL BIOS*.ASM {Finds LABEL in a series of assembly files}
COMMENTS:
Because CP/M CCP converts all arguments to uppercase,
this program does all its compares in uppercase. "abc" will
match "ABC" in all cases.
Command Line
___________________________________
|
| PATTERN, FILE NAMES, OPTIONS
|
______________V______________
Standard Input | | Standard Output
FILE NAMES | | FILE NAMES/TEXT LINES
------------------->| SEARCH |----------------------->
| |
| |
|___________________________|